﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            MainFrame.ContentRendered += new EventHandler(MainFrame_ContentRendered);

        }

        void MainFrame_ContentRendered(object sender, EventArgs e)
        {
            ((IModule)MainFrame.Content).Feedback += new EventHandler(MainWindow_Feedback);
        }

        void MainWindow_Feedback(object sender, EventArgs e)
        {
            this.MessageBar.Text = ((FeedbackEventArgs)e).MessageText;
        }

        private void Profile_Click(object sender, RoutedEventArgs e)
        {
            //MainFrame.Source = new Uri("Page1.xaml", UriKind.Relative);
            MainFrame.Content = new Page1();
  //          MainFrame.ContentRendered += MainFrame.ContentRendered(sender, eventargs);

        }

       





     }
}
